import request from '@/utils/request'

export function getmenus(params) {
    return request({
        url: '/menus',
        method: 'get',
        params
    })
}

export function delmenus(id) {
    return request({
        url: `/menus/${id}`,
        method: 'delete'
    })
}


export function addmenus(data) {
    return request({
        url: '/menus',
        method: 'POST',
        data
    })
}

export function getmenusid(res) {
    return request({
        url: `/menus/${res.id}`,
        method: 'get'
    })
}

export function datamenus(data) {
    return request({
        url: `/menus/${data.id}`,
        method: 'put',
        data
    })
}